<!DOCTYPE html>
<html class="no-js">

<head>
	<meta charset="utf-8">
	<title>{BEESCRM:$title}</title>
	<meta name="description" content="">
	<meta name="HandheldFriendly" content="True">
	<meta name="MobileOptimized" content="320">
	<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui, user-scalable=no">
	<meta http-equiv="cleartype" content="on">
	<meta name="format-detection" content="telephone=no">

	<link rel="stylesheet" type="text/css" href="/assets/base/center/css/common.css">
	<link rel="stylesheet" type="text/css" href="/assets/base/center/css/index.css">
	<link rel="stylesheet" type="text/css" href="/assets/base/center/css/font.css">
	<link rel="stylesheet" type="text/css" href="/assets/base/center/css/swiper.min.css">
	<link rel="stylesheet" href="/assets/base/repair/js/sweetalert/lib/sweet-alert.css">
	<script src="/assets/base/repair/js/jquery-2.1.0.min.js"></script>
	<script src="/assets/base/repair/js/sweetalert/lib/sweet-alert.min.js"></script>
	<script src="/assets/base/repair/js/jq.utils.js"></script>
</head>
<body>
<div class="wraper center">
	<div class="head clearfix">
		<a href="javascript:history.back();" class="iconfont icon-zuo pull-left"></a>
		<span class="head-name pull-left">个人中心</span>
	</div>

	<div class="menu usercenter clearfix">
		<div class="menu-list">
			<p class="photo"><img src="{BEESCRM:$avatar}"/></p>
			<p class="menu-text">{BEESCRM:$username}</p>
			<p class="school"><span class="iconfont icon-dingwei"></span>{BEESCRM:$school_name}</p>
		</div>
	</div>

	<div class="cform-box">
		<div class="form-list tb-mode">
			<p class="tb-cell">手机：</p>
			<p class="tb-cell"><input value="{BEESCRM:$data.mobile}" id="tel"/></p>
			<div class="tb-cell btn" id="change"><p><span class="iconfont icon-modify"></span>修改</p></div>
			<div class="tb-cell btn" id="confirm"><p><span class="iconfont icon-modify"></span>确定</p></div>
		</div>
		<div class="form-list tb-mode">
			<p class="tb-cell">地址：</p>
			<p class="tb-cell"><input value="{BEESCRM:$data.address}" readonly/></p>
			<a href="{BEESCRM::U('/base/address/address',array('account_id'=>$account_id,'type' => 2001))}" class="tb-cell btn"><p><span class="iconfont icon-dingwei"></span>地址管理</p></a>
		</div>
	</div>

	<p class="enter">快捷入口</p>
	<div class="menu clearfix">
		<volist name="data.menu" id="vo">
			<a href="{BEESCRM:$vo.url}" class="menu-list tb-mode square pull-left">
				<p class="tb-cell">
				<span class="circle {BEESCRM:$vo.color}">
					<span class="{BEESCRM:$vo.icon}"></span>
				</span>
					<span>{BEESCRM:$vo.name}</span>
				</p>
			</a>
		</volist>
	</div>

	<div class="fix-box clearfix">
		<a href="{BEESCRM::U('/base/center/wlife',array('account_id'=>$account_id))}" class="btn-go">
			<p class="tb-mode center">
			<span class="tb-cell">
				<span class="circle blue-bg">
					<span class="iconfont icon-quan"></span>
				</span>
			</span>
				<span class="tb-cell">前往微生活</span>
			</p>
		</a>
		<a href="{BEESCRM::U('/base/center/center',array('account_id'=>$account_id))}" class="btn-go">
			<p class="tb-mode center">
			<span class="tb-cell">
				<span class="circle green-bg">
					<span class="iconfont icon-stars"></span>
				</span>
			</span>
				<span class="tb-cell">前往微服务</span>
			</p>
		</a>
	</div>
</div>
<script src="/assets/base/center/js/jquery-2.1.0.min.js"></script>
<script src="/assets/base/center/js/swiper.min.js"></script>
<script>
	var height = $(window).height();
	var bottombox_height = $('.fix-box').outerHeight();
	$('.wraper').css("minHeight",height);
	$('.wraper').css("paddingBottom",bottombox_height + 10);

	var width = $('.square').width();
	$('.square').css("height",width);

	$(function(){
		$('#change').click(function(){
			$('#tel').focus();
			$(this).hide();
			$('#confirm').css('display','table-cell');
		});
		$('#confirm').click(function(){
			var data={};
			var verify_method = /^(?:13\d|15\d|18\d|17\d|14\d)\d{5}(\d{3}|\*{3})$/;
			data.mobile=$('#tel').val();
			if(!verify_method.test(data.mobile)){
				$.alert('error','请填写正确的手机号');return;
			}
			var json={};
			json.method='post';
			json.type='json';
			json.url="{BEESCRM::U('/base/center/editMobile',array('account_id'=>$account_id))}";
			json.data=data;
			$.getAjax(json,false,reload,'');
			$(this).hide();
			$('#change').show();
		});
		function reload(){
			setTimeout('location.href=location.href',3000);
		}
	})
</script>
</body>
</html>
